<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>青岛市轮滑运动协会</title>
    <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 user-scalable=no">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="HandheldFriendly" content="True">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/materialize.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/normalize.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/owl.carousel.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/owl.theme.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/owl.transitions.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/fakeLoader.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/style.css?r=7">
</head>

<body>
<div id="rrapp">
    <div class="navbar-top">
        <div class="side-nav-panel-left">
            <a href="javascript:void(0)" data-activates="slide-out-left1" class="side-nav-left">
                <i class="fa fa-bars"></i>
            </a>
        </div>
        <div class="site-brand"></div>
        <div class="side-nav-panel-right">
            <label style="color: #fff; font-size: 18px;">{{siteName}}轮滑运动协会</label>
        </div>
    </div>

    <div class="slider">
        <ul class="slides">
            <li>
                <img src="${request.contextPath}/statics/img/slide1.jpg" alt="">
            </li>
        </ul>
    </div>
    <!--公告
    <div class="notice">
        <div class="notice-img"><img src="${request.contextPath}/statics/img/notice.png" height="26"/></div>
        <div class="notice-txt">您有一条公告信息，关于轮滑2023年终比</div>
    </div>
    -->

    <!--九宫格-->
    <div class="nav-btns">
        <div class="nav-title">功能模块</div>
        <div class="nav-btn">
            <div class="nbtn">
                <a href="about">
                    <img src="${request.contextPath}/statics/img/btn8.png" height="45"/>
                    <p>协会简介</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="cer-login">
                    <img src="${request.contextPath}/statics/img/btn1.png" height="45"/>
                    <p>运动员证</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="score-login">
                    <img src="${request.contextPath}/statics/img/btn2.png" height="45"/>
                    <p>赛事成绩</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="news-list?id=5">
                    <img src="${request.contextPath}/statics/img/btn3.png" height="45"/>
                    <p>赛事信息</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="teacher">
                    <img src="${request.contextPath}/statics/img/btn4.png" height="45"/>
                    <p>考官认证</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="cer-login">
                    <img src="${request.contextPath}/statics/img/btn5.png" height="45"/>
                    <p>证书查询</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="expert-list">
                    <img src="${request.contextPath}/statics/img/btn6.png" height="45"/>
                    <p>教练员公示</p>
                </a>
            </div>
            <div class="nbtn">
                <a href="clubs">
                    <img src="${request.contextPath}/statics/img/btn7.png" height="45"/>
                    <p>会员单位</p>
                </a>
            </div>
        </div>
    </div>

    <!--协会简介
    <div class="about-index">
        <div class="nav-title">协会介绍</div>
        <div class="about-index-img"><img src="${request.contextPath}/statics/img/about.jpg" height="150"/></div>
        <div class="about-index-title">
            关于协会我们可以了解
        </div>
        <div class="about-index-txt">
            <p>青岛市轮滑运动协会（Qingdao Roller Skating Association、QRSA）。 是由轮滑运动相关的单位和个人自愿结成的全市性、行业性、非营利性社会组织。</p>
        </div>
        <div class="about-index-btn">
            <a href="about" class="about-more">了解更多</a>
        </div>
    </div>
    -->

    <!--新闻资讯-->
    <div class="news-index">
        <div class="news-title">协会公告 <!--<span class="news-more"><a href="news-list?id=1">更多 ></a></span>--></div>
        <!--显示3个按钮
        <div class="news-btns">
            <a :href="'news-list?id='+item.id" class="news-btn" v-for="(item,index) in newsClassList" :class="[classIndex == index ? 'news-btn-hover' : '']"  v-if="index < 3" @click="changeClass(index)">{{item.classifyName}}</a>
        </div>
        -->
        <div class="news-list">
            <div class="news-list-txt" v-for="(item,index) in newsList" v-if="index < 3">
                <div class="news-list-title">{{siteType==1 ? item.title.replace('青岛市','山东省') : item.title}}</div>
                <div class="news-list-time">{{item.createDateStr}}</div>
            </div>
        </div>
        <div class="news-search">
            <div class="news-search-btn" @click="window.location.href='news-list?id=1&site=' + siteType">查看更多</div>
        </div>
    </div>

    <!--立即申请-->
    <div class="apply-index">
        <a href="apply">
            <img v-if="siteType==1" src="${request.contextPath}/statics/img/apply2.jpg" width="100%"/>
            <img v-else src="${request.contextPath}/statics/img/apply.png" width="100%"/>
        </a>
    </div>

    <!--会员单位
    <div class="vip-index">
        <div class="vip-title">会员单位</div>
        <div class="vip-list">
            <div class="vip-list-txt" v-for="(item,index) in memberList" v-if="index < 3">
                <div class="vip-list-title">{{item.clubName}}</div>
            </div>
        </div>
        <div class="vip-index-btn">
            <a href="clubs" class="vip-more">查看更多</a>
        </div>
    </div>
    -->

    <!--轮滑专家
    <div class="ex-index">
        <div class="ex-title">轮滑专家 <span class="ex-more"> <a href="expert-list"> 更多 > </a></span></div>
        <div class="ex-list">
            <div class="ex-list-txt" v-for="(item,index) in coachList" v-if="index < 4">
                <div class="ex-list-img">
                    <img :src="item.img" height="50"/>
                </div>
                <div class="ex-list-title">
                    <p class="ex-name">{{item.title}}</p>
                    <p class="ex-zhiwei">{{item.remark}}</p>
                </div>
            </div>
        </div>
    </div>
    -->


    <div id="fakeLoader"></div>
    <div class="footer">
        <div class="container">
            <div class="about-us-foot">
                <p>转载内容版权归作者及来源网站所有，本站原创内容转载请注明来源</p>
            </div>
            <!--
            <div class="copyright">
                <span>主半方青岛市轮滑运动协会</span>
            </div>
            -->
        </div>
    </div>
</div>
<script src="${request.contextPath}/statics/js/jquery.min.js"></script>
<script src="${request.contextPath}/statics/js/materialize.min.js"></script>
<script src="${request.contextPath}/statics/js/owl.carousel.min.js"></script>
<script src="${request.contextPath}/statics/js/fakeLoader.min.js"></script>
<script src="${request.contextPath}/statics/js/main.js"></script>
<script src="../statics/js/vue.min.js"></script>
<script>
    var vm = new Vue({
        el: '#rrapp',
        data: {
            coachList: [],
            newsClassList: [],
            newsList: [],
            memberList: [],
            classIndex: '',
            siteType: 0,
            siteName: '青岛市'
        },
        created: function () {
            this.getNewsClassify();
            this.getCoachList();
            this.getNewsByType();
            this.getMemberList();

            var url = decodeURI(location.search); //获取url中"?"符后的字串
            var tRequest = new Object();
            if (url.indexOf("?") != -1) {   //判断 URL 中是否包含查询字符串
                var str = url.substr(1);   //如果 URL 中包含查询字符串，截取查询字符串，去掉前面的“?”号。
                strs = str.split("&");    //将查询字符串按“&”号分割成一个个参数对。
                for(var i = 0; i < strs.length; i ++) {    //循环遍历所有的参数对。
                    tRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);    //对每一个参数对进行处理，将参数名和参数值存储到 tRequest 对象中。
                }
            }
            // this.userName = tRequest.userName;
            // this.idCard = tRequest.idCard;
            var site = tRequest.site;
            if(site==1){
                this.siteType = site;
                this.siteName = '山东省';
                document.title = '山东省轮滑运动协会';
            }
        },
        methods:{
            /**
             * 获取新闻分类
             */
            getNewsClassify(){
                $.ajax({
                    type: 'get',
                    url: '${request.contextPath}/h5/getNewsClassify/' + 2,
                    data: {
                    },
                    success: function (res) {
                        if(res.code === 0){
                            vm.newsClassList = res.data
                            console.log(res)
                        }else{
                            alert(res.msg);
                        }
                    },
                });
            },
            /**
             * 根据新闻分类获取新闻内容
             */
            getNewsByType(e = 1){

                $.ajax({
                    type: 'get',
                    url: '${request.contextPath}/h5/getNewsByType/' + 1 + "/" + e,
                    data: {
                    },
                    success: function (res) {
                        if(res.code === 0){
                            vm.newsList = res.data
                            console.log(res)
                        }else{
                            alert(res.msg);
                        }
                    },
                });
            },
            /**
             * 获取教练列表
             */
            getCoachList(){
                $.ajax({
                    type: 'get',
                    url: '${request.contextPath}/h5/getCoachList/' + 2,
                    data: {
                    },
                    success: function (res) {
                        if(res.code === 0){
                            vm.coachList = res.data
                        }else{
                            alert(res.msg);
                        }
                    },
                });
            },
            /**
             * 获取教练列表
             */
            getMemberList(){
                $.ajax({
                    type: 'get',
                    url: '${request.contextPath}/h5/getMemberList',
                    data: {
                    },
                    success: function (res) {
                        if(res.code === 0){
                            vm.memberList = res.data
                        }else{
                            alert(res.msg);
                        }
                    },
                });
            },
            changeClass(index){
                this.classIndex = index;
            }
        }

    });
</script>
</body>

</html>
